﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using MongoDB.Driver;
using MongoDB.Bson;
using MongoDB.Driver.Builders;

namespace MidasPoster
{
    public class AuthFormBase  : Form
    {
        private string _strLoginUserName = "";
        private string _strTitle = "";
        protected string Title
        {
            set { _strTitle = value; }
            get { return _strTitle; }
        }
        public AuthFormBase()
        {
            this.Load += new System.EventHandler(this.AuthFormBase_Load);
        }
        protected void AuthFormBase_Load(object sender, EventArgs e)
        {
            
            
        }
        protected void UpdateTitle()
        {
            _strLoginUserName = "";
            if (DBManager.Singleton.IsSuccessLogin)
            {
                _strLoginUserName = DBManager.Singleton.LoginUserName;
                this.Text = _strTitle + "  [Current User:" + _strLoginUserName + "]";
            }
            else
            {
                this.Text = _strTitle + "  [Failed Login！]";
            }
        }

    }
}
